﻿<%@ Page language="c#" Codebehind="Listview.aspx.cs" AutoEventWireup="false" Inherits="UDS.SubModule.UnitiveDocument.NewDoc.Listview" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-cn" />
<meta name="author" content="Herry" />
<meta name="Copyright" content="Copyright (c) 2009 himm.cn" />
<title>Listview</title>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link rel="stylesheet" type="text/css" href="/css/other.css" media="screen" />
<link rel="stylesheet" type="text/css" href="/css/table.css" />


<script language="javascript">

function selectAll(){
	var len=document.Listview.elements.length;
	var i;
    for (i=0;i<len;i++){
	if (document.Listview.elements[i].type=="checkbox"){
        document.Listview.elements[i].checked=true;								
				 }
			}
		}

function unSelectAll(){
      var len=document.Listview.elements.length;
      var i;
      for (i=0;i<len;i++){
           if (document.Listview.elements[i].type=="checkbox"){
              document.Listview.elements[i].checked=false; 
           }   
    	 } 
    }		

</script>
<body>
<div class="m">
		<form id="Listview" method="post" runat="server">
		<p class="path"><span class="right"><input class="redButtonCss" onclick="selectAll()" type="button" value="全部选择"><input type="button" onclick="unSelectAll()" value="全部取消" class="redButtonCss"><asp:Button id="btnThowAwayDocument" runat="server" Text="丢弃文档" CssClass="redButtonCss"></asp:Button></span><a href="/SubModule/UnitiveDocument/">我的桌面</a> >> 我的文档 >> 已归档</p>
	<div class="con">
		<div class="tabnav">
        <p class="tabnavhead"> <span class="active2 tnc"> <a href="../Task/Listview.aspx">已归档</a> </span> <span class="active1 tnc"> <a href="../Approve/Listview.aspx">待审批</a> </span> </p>
      </div>
        <asp:datagrid id="dgDocList" runat="server" DataKeyField="DocID" ShowFooter="True" OnSortCommand="DataGrid_SortCommand" CellPadding="3" BorderWidth="1px" BorderColor="#337FB2" OnPageIndexChanged="DataGrid_PageChanged" PageSize="15" Width="100%" PagerStyle-HorizontalAlign="Right" PagerStyle-Mode="NumericPages" AllowPaging="True" AutoGenerateColumns="False" AllowSorting="True">
	        <AlternatingItemStyle HorizontalAlign="Center" VerticalAlign="Middle" BackColor="#E8F4FF"></AlternatingItemStyle>
	        <ItemStyle   HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
	        <HeaderStyle   HorizontalAlign="Center" ForeColor="White" VerticalAlign="Top"
		        BackColor="#337FB2"></HeaderStyle>
	        <FooterStyle   HorizontalAlign="Center" VerticalAlign="Bottom"></FooterStyle>
	        <Columns>
		        <asp:TemplateColumn HeaderText="◎">
			        <HeaderStyle Width="5%"></HeaderStyle>
			        <ItemTemplate>
        				 
					        <asp:CheckBox id="DocID" runat="server"></asp:CheckBox> 
			        </ItemTemplate>
		        </asp:TemplateColumn>
		        <asp:TemplateColumn SortExpression="DocTitle" HeaderText="文档标题">
			        <HeaderStyle HorizontalAlign="Left" Width="25%"></HeaderStyle>
			        <ItemStyle   HorizontalAlign="Left"></ItemStyle>
			        <ItemTemplate>
				        <a href='../Document/BrowseDocument.aspx?DocId=<%# DataBinder.Eval(Container.DataItem,"DocID") %>'>
					        <%# (DataBinder.Eval(Container.DataItem,"DocTitle").ToString().Length>30)?DataBinder.Eval(Container.DataItem,"DocTitle").ToString().Substring(0,30)+"...":DataBinder.Eval(Container.DataItem,"DocTitle").ToString() %>
				        </a>
			        </ItemTemplate>
		        </asp:TemplateColumn>
		        <asp:BoundColumn DataField="DocViewedTimes" SortExpression="DocViewedTimes" HeaderText="浏览次数">
			        <HeaderStyle Width="10%"></HeaderStyle>
			        <ItemStyle   HorizontalAlign="Center"></ItemStyle>
		        </asp:BoundColumn>
		        <asp:TemplateColumn SortExpression="DocApprover" HeaderText="审批人">
			        <HeaderStyle Width="10%"></HeaderStyle>
			        <ItemTemplate>
				        <asp:Label runat="server" Text='<%# GetRealName(DataBinder.Eval(Container, "DataItem.DocApprover").ToString()) %>'>
				        </asp:Label>
			        </ItemTemplate>
		        </asp:TemplateColumn>
		        <asp:TemplateColumn SortExpression="DocAddedBy" HeaderText="上传人">
			        <HeaderStyle Width="10%"></HeaderStyle>
			        <ItemTemplate>
				        <asp:Label runat="server" Text='<%# GetRealName(DataBinder.Eval(Container, "DataItem.DocAddedBy").ToString()) %>'>
				        </asp:Label>
			        </ItemTemplate>
		        </asp:TemplateColumn>
		        <asp:HyperLinkColumn DataNavigateUrlField="ClassID" DataNavigateUrlFormatString="../Project.aspx?ClassID={0}"
			        DataTextField="ClassName" SortExpression="ClassName" HeaderText="所属项目">
			        <HeaderStyle Width="20%"></HeaderStyle>
			        <ItemStyle HorizontalAlign="Center"></ItemStyle>
		        </asp:HyperLinkColumn>
		        <asp:TemplateColumn SortExpression="DocAddedDate" HeaderText="上传日期">
			        <HeaderStyle HorizontalAlign="Center" Width="20%"></HeaderStyle>
			        <ItemStyle   HorizontalAlign="Center"></ItemStyle>
			        <ItemTemplate>
				        <asp:Label runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.DocAddedDate") %>'>
				        </asp:Label>
			        </ItemTemplate>
		        </asp:TemplateColumn>
	        </Columns>
	        <PagerStyle   BorderColor="#E0E0E0" BorderStyle="Dotted" HorizontalAlign="Right"
		        ForeColor="White" BackColor="#E8F4FF" Mode="NumericPages"></PagerStyle>
        </asp:datagrid>
					</div>
</form>
</div>
</body>
</html>